package cn.ds.fly.common;

import cn.ds.fly.utils.UUIDUtils;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by lds on 2017/12/14.
 * @author lds
 */
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = -7736662420102694053L;
    /**逻辑删除标志（正常：0，删除：1）*/
    private static final int DEL_FLAG_NORMAL = 0;
    private static final int DEL_FLAG_DELETE = 1;

    @Id
    private String id = UUIDUtils.generateShortUuid();

    @Column(name="create_user")
    /**创建人*/
    private String createUser;

    @Column(name = "create_time")
    /**创建时间*/
    private Date createTime;

    @Column(name = "update_user")
    /**更新人*/
    private String updateUser;

    @Column(name="update_time")
    /**更新时间*/
    private Date updateTime;

    @Column(name = "remark")
    /**备注*/
    private String remark;

    @Column(name="del_flag")
    /**删除标志*/
    private int delFlag = DEL_FLAG_NORMAL;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemarks() {
        return remark;
    }

    public void setRemarks(String remark) {
        this.remark = remark;
    }

    public int getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(int delFlag) {
        this.delFlag = delFlag;
    }

}
